@extends('admin_system/public/layout')
@section('content')

    <div class="alert alert-info">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>
        <strong>查找用户!</strong><br><br>
        <form action="/admin_system/live/serch" method="post">
            {{csrf_field()}}
            <input type="text" name="hot" class="form-control col-md-4" placeholder="用户名/手机号" style="width: 25%">
            <input type="hidden" name="group_id" class="form-control" value="{{$group_id}}" style="width: 25%">
            <button class="btn btn-danger" type="submit" style="margin-left: 50px">确定</button>
        </form>
    </div>

    <div class="panel panel-info">
        <div class="panel-heading">
            <h3 class="panel-title">当前位置:视频直播管理 > 观看列表</h3>
        </div>
        <div class="panel-body">
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>头像/用户名</th>
                        <th>地区</th>
                        <th>进入直播间的时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($tmp as $k=>$v)
                        <tr>
                            <td>{{$v['user_name']}}</td>
                            <td>{{$v['city']}}</td>
                            <td>{{date('Y-m-d H:i:s',$v['join_time'])}}</td>
                            <td>
                                {{--<button class="btn">--}}
                                <form action="/admin_system/live/modify" method="post">
                                    <input type="hidden" name="member_account" value="{{$v['member_account']}}">
                                    <input type="hidden" name="role" value="{{$v['role']}}">
                                    <input type="hidden" name="group_id" value="{{$group_id}}">
                                    <button type="submit" class="btn">{{$v['role']=='Admin'?'取消管理员':'设置管理员'}}</button>
                                    {{csrf_field()}}
                                </form>
                                {{--<a href="/admin_system/live/modify/{{$v['member_account']}}/{{$v['role']}}/{{$group_id}}">{{$v['role']=='Admin'?'取消管理员':'设置管理员'}}</a>--}}

                                {{--</button>--}}
                            </td>
                            <td>
                                {{--<button class="btn">--}}

                                <form action="/admin_system/live/speakLimit" method="post">
                                    <input type="hidden" name="set_account" value="{{$v['member_account']}}">
                                    <input type="hidden" name="role" value="{{$v['role']}}">
                                    <input type="hidden" name="group_id" value="{{$group_id}}">
                                    {{csrf_field()}}
                                    <button type="submit" class="btn">
                                        {{$v['is_limit']?'取消禁言':'禁言'}}
                                    </button>
                                </form>

                                {{--<a--}}
                                {{--href="/admin_system/live/speakLimit/{{$v['member_account']}}/24/{{$group_id}}">--}}
                                {{--{{$v['is_limit']?'取消禁言':'禁言'}}--}}
                                {{--</a>--}}
                                {{--</button>--}}
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>
@endsection